#include <iostream>
#include <cstdio>
#include <vector>

using std::vector;
using std::cin;
using std::cout;
using std::min;

struct Point {
    int x, y;
    Point(int x = 0, int y = 0) : x(x), y(y) {}
    int dist(const Point &other) const {
        return (x - other.x) * (x - other.x) + (y - other.y) * (y - other.y);
    }
};

void input(vector <Point> &lst, int &k) {
    int n;
    cin >> n >> k;
    lst.resize(n);
    for (int i = 0; i < n; i++) {
        cin >> lst[i].x >> lst[i].y;
    }
}

bool is_edge(Point a, Point b, int k) {
    return a.dist(b) <= k * k;
}

int dfs(int s, const vector <Point> &lst, vector <bool> &used, int k) {
    int cnt = 1;
    used[s] = true;
    for (int i = 0; i < lst.size(); i++) {
        if(!used[i] && is_edge(lst[s], lst[i], k)) {
            cnt += dfs(i, lst, used, k);
        }
    }
    return cnt;
}

bool solution(const vector <Point> &lst, int k) {
    vector <bool> used;
    used.assign(lst.size(), false);
    int cnt = dfs(0, lst, used, k);
    return cnt == lst.size();
}

bool output(bool answer) {
    if(answer) {
        cout << "YES";
    } else {
        cout << "NO";
    }
}

int main() {
    vector <Point> lst;
    int k;
    bool answer;
    input(lst, k);
    answer = solution(lst, k);
    output(answer);
    return 0;
}
